Unexpected output when using a CASE expression
02:08 28 Oct 2014

I was trying out some random things using case expression when I stumbled upon this scenario. The first statement throws an error but the second one works fine. Can someone help me understand the execution of CASE expression here.

SELECT CASE WHEN 1 = 1 THEN 'case 1'
            WHEN 2 = 2 THEN 2
            ELSE 10 END

SELECT CASE WHEN 1 = 1 THEN 1
            WHEN 2 = 2 THEN 'case 2'
            ELSE 10 END
sql sql-server t-sql