title: Dynamically convert row into columns based on the content in the cell in SQL Server & Oracle
body: <p>Using procedure i am trying to achieve below use case. Can someone please guide me. 
  Here is the data which is present in a table </p>
  
  <pre><code>Source Table : 
  
  ID  | attendance |
  ------------------
  123 | MTW
  124 | TW
  ------------------
  
  Target Table :
  
  ID  | attendance
  -----------------
  123 | M
  123 | T
  123 | W
  124 | T
  124 | W
  -----------------
  </code></pre>