T-sql conditional order by multiple columns