title: Extract and evaluate range from a give range string
body: <p>I have a table in which products are stored. Below is the schema with data.</p>
  <p><a href="https://i.stack.imgur.com/REpsL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/REpsL.png" alt="enter image description here" /></a></p>
  <p>What I want to achieve is that I will pass ProductId, Tenure and Range as parameters and it will pick matched record.</p>
  <p>So for example, If I have my Parameters <code> ProductId = 21</code>, <code>Tenure=Duration=1</code> , and <code>Range =14678</code> , then it should give me <code>Id=4</code> as my expected output. Because the range is given 10001-15000.</p>