title: How to convert column values to column names in teradata?
body: <p>I have a table as follows:</p>
  
  <pre><code>Name     Subjects 
  X         math 
  Y         science
  Z         english
  </code></pre>
  
  <p>I need a report in the following format: </p>
  
  <pre><code>  Name      math     science     english
      X         Y         N          N
      Y         N         Y          N
      Z         N         N          Y
  </code></pre>
  
  <p>How do I achieve this using a single select query?</p>