Select status from table where 'condition' order by case when status = 'P' then 0 else 1 end, status desc