title: CASE statement equivalent to if or else-if
body: <p>In this sql CASE statement:</p>
  
  <pre><code>CASE WHEN col1 = 'X' then 'A'  
  CASE when col2 = 'Y' then 'B'  
  else 'C' as result ...
  </code></pre>
  
  <p>if col1=X, and col2 = Y, will the output be 'A' or 'B' ? i.e. is the CASE statement functioning as an if or an else-if?</p>