<select id="queryCmonByLanId" parameterType="java.util.Map" resultType="java.util.Map">
SELECT t.REGION_NAME,
case t.REGION_TYPE
WHEN '1400' then (SELECT c.PAR_REGION_ID FROM common_region c where c.COMMON_REGION_ID = t.COMMON_REGION_ID)
when '1300' then t.COMMON_REGION_ID
when '1100' then t.COMMON_REGION_ID
else t.COMMON_REGION_ID
END as REGION_ID,
case t.REGION_TYPE
WHEN '1400' then (SELECT d.PAR_REGION_ID FROM common_region d where d.COMMON_REGION_ID = t.PAR_REGION_ID)
when '1300' then (SELECT e.PAR_REGION_ID FROM common_region e where e.COMMON_REGION_ID = t.COMMON_REGION_ID)
when '1100' then t.COMMON_REGION_ID
else t.COMMON_REGION_ID
END as PROV_REGION
from common_region t where t.REGION_NBR = #{lanId}
and t.STATUS_CD = '1000'
</select>