title: Displaying multiple columns from a single column select statement
body: <p>I'm trying to extract data from a table and display multiple columns based on the results from a single column.</p>
  
  <p>For example, my table has a recordId, a valueId and a value.  It can look something like this</p>
  
  <pre><code>recordId   |  valueId   |  value
  1          |   5        |  2011-03-24
  2          |   5        |  2011-03-25
  3          |   3        |  Bobcat
  4          |   3        |  Backloader
  5          |   4        |  Mono
  6          |   4        |  Stereo
  </code></pre>
  
  <p>I'm trying to make multiple columns based on the valueId (e.g. valueId 5 is join date, valueId 3 is vehicle type, while valueId 4 is speaker type) but whenever I try to create their own columns, I end up getting the same data in both of the column returns.</p>
  
  <p>e.g.
  I'll use something like </p>
  
  <p><code>select recordId as Records, valueId as [Join Date], valueId as [Vehicle type], valueId as [Speaker Type], value as [Data Entered] where valueId = 5 OR valueId = 3 OR valueId = 4</code></p>
  
  <p>This will create the proper header, but I will get the same data in each column for each value call (e.g. the first row will have 2011-03-24 under Join Date, Vehicle Type and Speaker Type, row 2 will be 2011-03-25 instead and row 3 will be Bobcat)</p>
  
  <p>Thanks for any help provided!</p>
  
  <p>Edit : Thanks to everyone that provided help!  I'd upvote if I could but whenever I try it tells me I have to log in or register (Which is weird since I am logged in to edit and approve answers...)</p>