How do I add a COALESCE to a db_select?
You can add an expression:

$query = db_select('TEST_ATTRIBUTES', 't')
  -&gt;fields('t', array('Column1', 'Column2'));

$query-&gt;addExpression('COALESCE(Column1, Column2)', 'Column3');


The above yields:

SELECT  
  t.Column1 AS Column1, 
  t.Column2 AS Column2, 
  COALESCE(Column1, Column2) AS Column3
FROM TEST_ATTRIBUTES t