title: Alias Column name in mutiple case statement
body: <p>I am trying to retrieve a value for a alias column using case statement.</p>
  
  <pre><code>CASE 
      WHEN FieldA = 'TestA' THEN FieldA1
      WHEN FieldB = 'TestB' THEN FieldB1
      ELSE NULL
  END AS Alias1 
  </code></pre>
  
  <p>But when I try to use this alias to retrievce value for another alias , I am getting an error</p>
  
  <pre><code>CASE
      WHEN Alias1 = FieldA1 THEN FieldA0
      WHEN Alias1 = FieldB1 THEN FieldA1
      ELSE NULL
  END AS Alias2 
  </code></pre>
  
  <p>Error message I get is : </p>
  
  <p><img src="https://i.stack.imgur.com/ObSB1.jpg" alt="enter image description here"></p>
  
  <p>Can you suggest a way to get rid of the error or any alternative approach which fulfills my requirements</p>