title: Sql Query to get the values based on % of input
body: <p>I have a table like below</p>
  
  <pre><code> Board Component Cost
  
      b1     c1       5
      b1     c2       10
      b2     c3       15
      b3     c4       20
      b3     c5       25
      b4     C6       25
    ---------------------
                    100%
  </code></pre>
  
  <p>I shoud give the input to get the values from the table, say...</p>
  
  <p>If the input is 20%</p>
  
  <p>the output should be</p>
  
  <pre><code> Board Component Cost
  
      b1      c1      5
      b1      c2     10
      b2      c3     15
  </code></pre>
  
  <p>If the input is 50%</p>
  
  <p>the output should be</p>
  
  <pre><code> Board Component Cost
  
      b1      c1      5
      b1      c2     10
      b2      c3     15
      b3      c4     20
  </code></pre>
  
  <p>and so on</p>
  
  <p>How to write the query in sql server</p>