Unexpected result of case expression The following case expression results in a, 

select case 0 when true  then 'c' when 'true1222' then 'a' else 'b' end;  


Anyone knows why? How could 0 be equal to true1222?
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'