select a as max from table
where a>b
union 
select b as max from table
where b>=a;