title: Select repeated data based on column value
body: <p>Suppose I have a dataset as</p>
  
  <pre><code>----------------------
   col1 | col2 | col3 |
  ----------------------
     a      b      3
     c      d      2
  ----------------------
  </code></pre>
  
  <p>Now Is there a way in SQL to select </p>
  
  <pre><code>----------------------
   colx | coly | colz |
  ----------------------
     a      b      1
     a      b      2
     a      b      3
     c      d      1
     c      d      2
  ----------------------
  </code></pre>
  
  <p>i.e. col1 and col2 repeated col3 number of times.</p>