select max(t.d) from (select c1 as d from ttt union select c2 as d from ttt union select c3 as d from ttt)t
扩展用法:
update ttt set `max` = (select max(t.d) from (select c1 as d from ttt union select c2 as d from ttt union select c3 as d from ttt)t) where id=1