sql case functions and colons put in line breaks

It’s stubborn, but the replace filter can remove all the line feeds:

{%- set lowerstring -%}
    lower({{ space_cleanup(input_column, spacing) }})
{%- endset -%}

{{ lowerstring | replace('\n','') }}