IF (predicate, expression1, expression2)
The system scalar functions IF and NULL are SQL extensions.
IF allows you to enter different values depending on whether the condition is true or false. For example, if you want to display a column with logical values as “true” or “false” instead of a binary representation, you would use the following SQL statement:
SELECT IF(logicalcol=1, 'True', 'False')