title: How to the result set form the below table
body: <p>Table 1 contains certain set of data's. I need to get the following result set form the Table 1</p>
  
  <p>Table1</p>
  
  <pre><code>Id  Desc          ParentId
  1   Cloths            0
  2   Mens              1
  3   Womens            1
  4   T-Shirt_M         2
  5   Casual Shirts_M   2
  6   T-Shirt_F         3
  7   Education         8
  </code></pre>
  
  <p>If I pass a parameter as "Casual Shirts_M" I should get the below result set.</p>
  
  <p>Result Set</p>
  
  <pre><code>Id  Desc          ParentId
  1   Cloths            0
  2   Mens              1
  5   Casual Shirts_M   2
  </code></pre>