title: SQL: Alternative to COALESCE() function that groups all values into one column
body: <p>I have a table like this</p>
  
  <p><a href="https://i.stack.imgur.com/kbSt4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kbSt4.png" alt="enter image description here"></a></p>
  
  <p>Using the COALESCE() function... </p>
  
  <pre><code>SELECT COALESCE(column1, column2, column3) combinedColumn from t;
  </code></pre>
  
  <p>I get this...</p>
  
  <p><a href="https://i.stack.imgur.com/27EqK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/27EqK.png" alt="enter image description here"></a></p>
  
  <p>However, I want this....</p>
  
  <p><a href="https://i.stack.imgur.com/ohxXS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ohxXS.png" alt="enter image description here"></a></p>
  
  <p>I found a work around using UNION ALL but this isn't very elegant. Is there a function that works like COALESCE() except includes all values? Thanks</p>