SELECT CASE WHEN column IS NULL OR another_column = 1 THEN 'yes' ELSE 'no' END AS 'MyData' FROM table_name;