CONCAT(str1,str2,...)
SELECT * FROM `diag` AS t1,icd9_to_10 AS t2 WHERE t1.DiagCode LIKE CONCAT(t2.icd9_code,'%');