title: To find previous/next value in Sql server IN condition
body: <p>Say I have a IN condition (11,22,32,34,44,55), I know my parameter is now 32. Is it possible to find my parameter's current position and get the previous (here 22) or next (34) value? If so, what's the best way? </p>
  
  <p>I got several notes with note_num. It's easy to get the first note and last note by using max and min. But I want to get next or previous note. What's the best way to do it?</p>