title: Merge two columns in Select into one column based on a condition
body: <p>I have a <code>SELECT</code> with two columns I'd like to merge based on the condition that if the left one is null it should choose the right column but when the left column is not null it should always choose the left.</p>
  
  <h1>scenario</h1>
  
  <p>What I have on the left is what I currently Have and I'd like to get the table on the right</p>
  
  <p>AlphabetTable</p>
  
  <pre><code>+-------+------+    +---------+
  | A     | B    |    | Desired |
  +-------+------+    |---------+
  | null  | 1    |    | 1       |
  | null  | 1    |    | 1       |
  |  2    | null |    | 2       |
  |  2    | 3    |    | 2       |
  |  2    | 5    |    |  2      |
  |  null | null |    | null    |
  +-------+------+    +---------+
  </code></pre>
  
  <h1>SQL for left table above</h1>
  
  <pre><code>SELECT 
      CAST((select sum(Total) from LettersTable LT
                                  WHERE LT.ID = ID
                                  AND LT.Count &gt; 5) 
                                  AS INT) as A
      CAST((select sum(Total) from LettersTable LT
                                  WHERE LT.ID = ID
                                  AND LT.Count &gt; 5) 
                                  AS INT) as B
  From IDTable
  </code></pre>
  
  <p>Heres what I have so far</p>
  
  <pre><code>SELECT 
          CASE WHEN
              CAST((select sum(Total) from LettersTable LT
                          WHERE LT.ID = AT.ID
                          AND LT.Count &gt; 5) 
                          AS INT) IS NULL             
              THEN 
                  (select sum(Total) from LettersTable LT
                          WHERE LT.ID = AT.ID
                          AND LT.Count &gt; 5) 
                          AS INT)
              ELSE  
                  (select sum(Total) from LettersTable LT
                          WHERE LT.ID = AT.ID
                          AND LT.Count &gt; 5) 
                          AS INT)
   FROM AlphabetTable AT
  </code></pre>