FUNCTION products.IF does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT products.productID, products.IF(LENGTH(`name_en`), `name_en`, `name_ru`) AS name, products.Price, products.slug FROM SC_products products LEFT JOIN SC_categories categories USING(categoryID) WHERE products.enabled = 1 AND products.productID <> 3803 AND (products.categoryID = 777 OR categories.parent = 777) LIMIT 5