FUNCTION t1.IF does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT t1.categoryID, t1.IF(LENGTH(`name_en`), `name_en`, `name_ru`) AS name, t1.products_count, t1.products_count_admin, t1.parent,t1.id_1c, t1.hidden, t2.* FROM SC_categories t1 LEFT JOIN SC_caregory_xml t2 ON t2.itemID=t1.categoryID WHERE t1.parent=1 ORDER BY t1.sort_order, name