set @a := 0;
set @cnt := (select count(*) from t_table);
select
(sum(case when num = ceil(@cnt / 2) then c_value else null end)
+ sum(case when num = ceil((@cnt + 1) / 2) then c_value else null end)) / 2
from(
select (@a := @a + 1) num,c_value from t_table order by c_value
)w