title: Is there a way to create a new column and assign values based on criteria on an existing column in a SQL query?
body: <p>I want to create a new column in my query output and assign values to it based on existing columns in my input. Let's say i have column A in my input and want to create column B in my query output. How do I add the following logic in a sql select statement?</p>
  <p>If A = 1 then set B to x</p>
  <p>Else if A = 2 then set B to y</p>
  <p>Else if A = 3 then set B to z</p>
  <p>Else set B to null</p>
  <p>I have to do this for multiple new columns in my output within the same query.</p>