IF(condition, result1, result2)
--you can also nest IF queries: IF(condition1, result1, IF(condition2, result2a, result2b)