I wrote a T-SQL Statement similar like this (the original one looks different but I want to give an easy example here):
SELECT first_name + CASE last_na
CASE WHEN last_name IS NULL THEN '' ELSE ' '+last_name END