case when 条件1  then 结果1
else 结果2 end
相当于 if(条件1)
               结果1
           else
              结果2
select 
   (case when age >= 25 then '25岁及以上'
    else '25岁以下' end) as age_cut,
   count(device_id) as number 
from user_profile
group by age_cut