总共特殊就几个。你直接单独判断一下自治区就行了。。。。
西藏。新疆,广西。宁夏。好像就这几个特殊吧。。
case when instr(列,"新疆")>0 then 你的语句
when instr(列,"西藏")>0 then 你的语句
when instr(列,"宁夏")>0 then 你的语句
when instr(列,"广西")>0 then 你的语句
else 通用的语句就是你上面的sql end as dddd
/*修改你特殊的*/
SELECT
case when instr('新疆维吾尔自治区乌鲁木齐市','新疆')>0 then '新疆维吾尔自治区'
when instr('新疆维吾尔自治区乌鲁木齐市','广西')>0 then '广西壮族自治区'
else '其它通用' end as 省份,
case when instr('新疆维吾尔自治区乌鲁木齐市','新疆')>0 then substring(substring('新疆维吾尔自治区乌鲁木齐市XXX县',9,8),1,instr(substring('新疆维吾尔自治区乌鲁木齐市XXX县',9,8),'市'))
when instr('新疆维吾尔自治区乌鲁木齐市','广西')>0 then '广西壮族自治区'
else '其它通用' end as 城市
