select
    case
        when name is null then
        case when pp.center  is null then '集团'
        else if(pp.region is null,pp.center,pp.region)
        end
        else name 
    end pastureName
from
    pasture pp
    where id <>18
group by
    pp.center,
    pp.region,
    name with rollup