title: SQL Pivot Table
body: <p>I have a SQL view with following data:</p>
  
  <pre><code>ID   ClassName    Description   Flags
  1    Class1         Desc1        F1
  2    Class1         Desc1        F2
  3    Class1         Desc1        F3
  4    Class1         Desc1        F4
  5    Class2         Desc2        F2
  6    Class2         Desc2        F6
  7    Class3         Desc3        F1
  8    Class4         Desc4        F8
  </code></pre>
  
  <p>I want result something like this:</p>
  
  <pre><code>ClassName    Description    F1   F2  F3  F4  F6   F8
  Class1         Desc1         T    T  T    T   F   F
  Class2         Desc2         F    T  F    F   T   F
  Class3         Desc3         T    F  F    F   F   F
  Class4         Desc4         F    F  F    F   F   T
  </code></pre>
  
  <p>I have tried to look up for Pivot examples but all of them are either for SUM or other aggregate functions. Not sure if any of that will work as I'm not doing either.</p>