IF

The IF function evaluates an expression and returns a second expression depending on the answer.

IF Syntax

Use the following syntax when incorporating the IF function in queries:

IF (expression1, expression2, expression3)

If the first expression evaluates to true, the IF function returns the value of the second expression. If the first expression evaluates to false, IF returns the value of the third expression.