title: combining boolean results from two columns SQL
body: <p>I have the following example data from two Boolean columns:</p>
  
  <pre><code>ID      Male      Female
  1        1          0
  2        0          1
  3        0          1
  4        1          0
  5        0          1
  </code></pre>
  
  <p>I would like to combine the two columns into a single column containing just 'M' and 'F'. Also, I would preferably like to do it in the SELECT statement I am writing while defining the column.</p>
  
  <p>The result then should be something like:</p>
  
  <pre><code>ID     Gender
  1        M
  2        F
  3        F
  4        M
  5        F
  </code></pre>
  
  <p>I know I could achieve this with separate update statements like:</p>
  
  <pre><code>UPDATE table_1
  SET Gender='M'
  FROM table_2 t2
  WHERE t2.Male=1
  </code></pre>
  
  <p>and</p>
  
  <pre><code>UPDATE table_1
  SET Gender='F'
  FROM table_2 t2
  WHERE t2.Female=1
  </code></pre>
  
  <p>But I was really hoping to achieve the same result while declaring the Gender column?</p>
  
  <p>Does anyone know if this is possible?</p>
  
  <p>Thanks in advance!</p>