title: Repeating Column Value Into Row in SQL
body: <p>I'm wondering how to turn a column which contains repetitive column values into rows in MSSQL. Here is an example of what I'm working with.</p>
  
  <pre><code>CREATE TABLE Colors
  (
      Time_ Time,
      Color varchar(6),
      count int
  )
  
  INSERT INTO Colors VALUES ('10:00', 'Red', 2);
  INSERT INTO Colors VALUES ('10:00', 'Orange', 3);
  INSERT INTO Colors VALUES ('10:00', 'Yellow', 6);
  INSERT INTO Colors VALUES ('10:00', 'Green', 9);
  INSERT INTO Colors VALUES ('10:00', 'Blue', 2);
  INSERT INTO Colors VALUES ('11:00', 'Red', 3);
  INSERT INTO Colors VALUES ('11:00', 'Orange', 4);
  INSERT INTO Colors VALUES ('11:00', 'Yellow', 6);
  INSERT INTO Colors VALUES ('11:00', 'Green', 7);
  INSERT INTO Colors VALUES ('11:00', 'Blue', 1);
  INSERT INTO Colors VALUES ('12:00', 'Red', 2);
  INSERT INTO Colors VALUES ('12:00', 'Orange', 2);
  INSERT INTO Colors VALUES ('12:00', 'Yellow', 7);
  INSERT INTO Colors VALUES ('12:00', 'Green', 9);
  INSERT INTO Colors VALUES ('12:00', 'Blue', 4);
  </code></pre>
  
  <p>And SQLFiddle: <a href="http://sqlfiddle.com/#!3/48657/1" rel="nofollow noreferrer">http://sqlfiddle.com/#!3/48657/1</a></p>
  
  <p>What I'm looking for is a table where the rows are Time_, Red, Orange, Yellow, Green, Blue. So it would look something like this: </p>
  
  <p><img src="https://i.imgur.com/HBOyrz7.png" /></p>
  
  <p>Any help would be appreciated.</p>