NULLIF()
The NULLIF() function returns NULL if the two given expressions are the same, otherwise it returns the first expression.
NULL
NULLIF(expr1, expr2)
SELECT NULLIF(1, 1) -> NULL
SELECT NULLIF(1, 2) -> 1