Select multiple columns in IF clause conditionally?
SELECT
  id,(CASE WHEN signal_field =1 THEN firstname END) as first,
     (CASE WHEN signal_field =1 THEN lastname  END) lastname as last,
     (CASE WHEN signal_field!=1 THEN concat(firstname,lastname) END) as firstlast
FROM mytable;