title: SQL Combine two Columns from one table into one
body: <p>This seemed simple, but I'm already using a temp table and can't think of how to combine my</p>
  <pre><code>With cte as
  
  (select ID,
          TEST_DATE, 
          CATEGORY_A_TOTAL_TEST, 
          CATEGORY_B_TOTAL_TEST, 
          right(TEST_DATE,4) as Test_year
  from TESTS) 
  
  select cte.*, b.Average,b.NationalAverage
  from cte
  left join Averages b 
  on cte.Test_year = b.Test_Year 
  </code></pre>
  <p>I'm wanting to  have these columns to be called Total_Test in one column:
  CATEGORY_A_TOTAL_TEST
  CATEGORY_B_TOTAL_TEST</p>
  <p>Can I union in a temp or use some sort of case?</p>
  <p>Here's a sample:</p>
  <pre><code>CATEGORY_A_TOTAL_TEST
  42
  47
  55
  58
  30
  42
  63
  52
  47
  47
  
  CATEGORY_B_TOTAL_TEST
  42
  47
  55
  58
  30
  42
  63
  52
  47
  47
  
  Total_Test
  42
  47
  55
  58
  30
  42
  63
  52
  47
  47
  41
  46
  54
  57
  30
  41
  63
  51
  47
  47
  </code></pre>