title: How to "spread" a single row in SQL server into multiple rows?
body: <p>I have a table called 'counts' which returns rows in the following form:</p>
  
  <pre><code>SELECT Name,
         PassCount,
         WarningCount,
         FailCount
  FROM counts
  
  ╔════════════════════════════════════════════╗
  ║ Name  PassCount   WarningCount   FailCount ║
  ╠════════════════════════════════════════════╣
  ║ Jeff  12          2              0         ║
  ║ Dan   0           0              1         ║
  ║ Mike  0           0              0         ║
  ╚════════════════════════════════════════════╝
  </code></pre>
  
  <p>What I want to achieve is to "spread" the results of the query out such that any rows that contain non-zero values in more than one of the PassCount, WarningCount, FailCount fields have a separate row for each non-zero value appearing in said count and zeros filled out elsewhere. I am looking to achieve a result like below, but I am very inexperienced with SQL Server and don't really know how to achieve this.</p>
  
  <pre><code>╔════════════════════════════════════════════╗
  ║ Name  PassCount   WarningCount   FailCount ║
  ╠════════════════════════════════════════════╣
  ║ Jeff  12          0              0         ║
  ║ Jeff  0           2              0         ║
  ║ Dan   0           0              1         ║
  ║ Mike  0           0              0         ║
  ╚════════════════════════════════════════════╝
  </code></pre>
  
  <p>As you can see the row containing the Name Jeff has been "spread" into two rows since it had a non-zero PassCount and WarningCount. Hopefully this makes some sense. I appreciate any help!</p>