Function Description
coalesce(expr1, expr2, ...) Returns the first non-null argument if exists. Otherwise, null.
if(expr1, expr2, expr3) If `expr1` evaluates to true, then returns `expr2`; otherwise returns `expr3`.
ifnull(expr1, expr2) Returns `expr2` if `expr1` is null, or `expr1` otherwise.
nanvl(expr1, expr2) Returns `expr1` if it's not NaN, or `expr2` otherwise.
nullif(expr1, expr2) Returns null if `expr1` equals to `expr2`, or `expr1` otherwise.
nvl(expr1, expr2) Returns `expr2` if `expr1` is null, or `expr1` otherwise.
nvl2(expr1, expr2, expr3) Returns `expr2` if `expr1` is not null, or `expr3` otherwise.
CASE WHEN expr1 THEN expr2 [WHEN expr3 THEN expr4]* [ELSE expr5] END When `expr1` = true, returns `expr2`; else when `expr3` = true, returns `expr4`; else returns `expr5`.