SELECT cc.`COMPANY_ID` COMPANY_ID,cc.`COMPANY_NAME` COMPANY_NAME,IFNULL(ccpt.`NAME`,'defalut') NAME FROM cblej_company cc

LEFT JOIN cblej_company_pc_templates ccpt ON cc.`COMPANY_ID` = ccpt.`REL_ID`

where cc.`COMPANY_ID` = 802