--disable_abort_on_error SELECT CASE MOD(1,5) when 4 then NULL END AS my_col; SELECT CASE MOD(4,5) when 4 then NULL END AS my_col; SELECT CASE MOD(1,5) when 4 then NULL ELSE 17 END AS my_col; SELECT CASE MOD(4,5) when 4 then NULL ELSE 17 END AS my_col; SELECT CASE MOD(4,5) when 4 then NULL when NULL then 2 ELSE MOD(4,5) END AS my_col; SELECT CASE MOD(NULL,5) when 4 then NULL when NULL then 2 ELSE 17 END AS my_col; SELECT CASE MOD(3,5) when 4 then NULL when NULL then 2 ELSE MOD(3,5) END AS my_col; SELECT CASE MOD(NULL,5) when NULL THEN 25 ELSE 17 END AS my_col; SELECT CASE NULL when NULL THEN 25 ELSE 17 END AS my_col; SET @aux = NULL; SELECT CASE @aux when NULL THEN 25 ELSE 17 END AS my_col; SET @aux = 1; SELECT CASE @aux when @aux THEN @aux ELSE NULL END AS my_col; SET @aux = NULL; SELECT CASE @aux when @aux THEN @aux ELSE 17 END AS my_col;