Unexpected result of case expression
the problem is - use 0 as CASE, 0 == false
so query compare:


TRUE - not, go forward
'true1222' - FALSE == 0, OK


try to change query:

SELECT
    CASE 3
WHEN TRUE THEN
    'c'
WHEN 'true1222' THEN
    'a'
ELSE
    'b'
END;


and it return expected - 'b'