title: How to find adjacent values in a column based on another column value in Sql
body: <p>I have a table like below</p>
  
  <p><img src="https://i.stack.imgur.com/y6oO9.jpg" alt="enter image description here"></p>
  
  <p>From the above table I Need to select adjacent values from val3 column based on Number column</p>
  
  <p>I Need output like below :</p>
  
  <p><img src="https://i.stack.imgur.com/Rlq3S.jpg" alt="enter image description here"></p>