1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'else 999 end as 'wertigkeit' ' at line 7

SELECT distinct c.categories_id, c.categories_status, c.parent_id, c.master_id, case true else 999 end as 'wertigkeit' from products as p inner join products_description as pd on p.products_id = pd.products_id and p.products_status = "1" inner join products_to_categories as c2d on p.products_id=c2d.products_id inner join categories_description as cd on c2d.categories_id=cd.categories_id inner join categories as c on cd.categories_id = c.master_id inner join categories as cm on cm.categories_id = c.master_id and c.categories_status = "1" WHERE c.categories_status = '1' AND cd.language_id = '2' AND pd.language_id = '2' AND p.group_permission_1=1

[XT SQL Error]