Say I have the following data
Name Value =============== Small 10 Medium 100 Large 1000
Imagine that these represent the
select a.newvalue from ( select MIN(value) as newvalue, 1 as order From table where value > @param union select MAX(value) as newvalue, 2 as order from table) A order by a.order