SELECT
COALESCE (chars.CFWEMAIL,
chars.CLMEMAIL,
chars.HLDEMAIL,
chars.IFREMAIL)
email
FROM tmp
I am trying to achieve the above without hardcoding the columns into the coalesce statement.
Can I use LIKE % instead?
Coalesce all columns LIKE '%MAIL'