USE tpch1; select CASE WHEN NULL IS NOT NULL THEN r_regionkey='10' ELSE ''='' END from region; CASE WHEN NULL IS NOT NULL THEN r_regionkey='10' ELSE ''='' END 1 1 1 1 1 select case r_regionkey=1 when 0 then "=1" else "<>1" end from region; case r_regionkey=1 when 0 then "=1" else "<>1" end =1 <>1 =1 =1 =1 select * from region where case when null is null then r_regionkey else r_regionkey > 2 end = 0; r_regionkey r_name r_comment 0 AFRICA lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to select * from region where case r_regionkey when r_regionkey = 1 then 'b' when r_regionkey=2 then "a" end > 'a'; r_regionkey r_name r_comment 0 AFRICA lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 1 AMERICA hs use ironic, even requests. s select * from region where case r_regionkey = 1 when 1 then 'a' when r_regionkey=0 then "b" else 'else' end > 'a'; r_regionkey r_name r_comment 0 AFRICA lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 2 ASIA ges. thinly even pinto beans ca 3 EUROPE ly final courts cajole furiously final excuse 4 MIDDLE EAST uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl select case r_regionkey when r_regionkey = 1 then '=1' when r_regionkey=2 then "=2" > 'a' end alias from region; alias =1 =1 NULL NULL NULL