I have tried CASE WHEN inside MATCH() but it give syntax error <pre><code> SELECT products_description.products_title, product_settings.setting_value, products_description.product_description, products_description.long_description, products_additional_option_description.title, products_sizes.size_title, product_category_description.category_name, products.products_id, products_description.imagename, Match (products_description.products_title) against ('bu*' IN boolean mode) AS rel_products_description_products_title, match (products_description.product_description) against ('bu*' IN boolean mode) AS rel_products_description_product_description, match (products_description.long_description) against ('bu*' IN boolean mode) AS rel_products_description_long_description, match (product_settings.setting_value) against ('bu*' IN boolean mode) AS rel_product_settings_setting_value, match (products_additional_option_description.title) against ('bu*' IN boolean mode) AS rel_products_additional_option_description_title, match (products_sizes.size_title) against ('bu*' IN boolean mode) AS rel_products_sizes_size_title, match (product_category_description.category_name) against ('bu*' IN boolean mode) AS rel_product_category_description_category_name , CASE WHEN store_products_description.products_title IS NOT NULL AND store_products_description.products_title!='' THEN store_products_description.products_title ELSE products_description.products_title END AS products_title, CASE WHEN store_products_description.product_description IS NOT NULL AND store_products_description.product_description!='' THEN store_products_description.product_description ELSE products_description.product_description END AS product_description, CASE WHEN store_products_description.long_description IS NOT NULL AND store_products_description.long_description!='' THEN store_products_description.long_description ELSE products_description.long_description END AS long_description , store_products.store_products_id FROM products LEFT JOIN products_description ON products_description.products_id = products.products_id LEFT JOIN store_products ON store_products.products_id = products.products_id LEFT JOIN store_products_description ON store_products.store_products_id = store_products_description.store_products_id AND products_description.site_language_id = store_products_description.site_language_id LEFT JOIN products_additional_option ON products_additional_option.products_id = products.products_id LEFT JOIN products_additional_option_description ON products_additional_option_description.prod_add_opt_id = products_additional_option.prod_add_opt_id LEFT JOIN product_settings ON product_settings.products_id = products.products_id AND product_settings.setting_constant_name = 'PRODUCT_SKU_NUMBER' LEFT JOIN product_category ON product_category.category_id = products.category_id LEFT JOIN product_category_description ON product_category.category_id = product_category_description.category_id LEFT JOIN products_sizes ON products_sizes.products_id = products.products_id WHERE 1 AND products.visible = '1' AND store_products.visible = '1' AND products.products_id != '-11' AND ( store_products.user_type_id = '1' OR store_products.user_type_id = '0' ) AND products_description.site_language_id = '1' AND store_products_description.site_language_id = '1' AND ( match ( CASE WHEN store_products_description.products_title IS NOT NULL AND store_products_description.products_title!='' THEN store_products_description.products_title ELSE products_description.products_title END AS products_title) against ('bu*' IN boolean mode) OR match ( CASE WHEN store_products_description.product_description IS NOT NULL AND store_products_description.product_description!='' THEN store_products_description.product_description ELSE products_description.product_description END AS product_description) against ('bu*' IN boolean mode) OR match ( CASE WHEN store_products_description.long_description IS NOT NULL AND store_products_description.long_description!='' THEN store_products_description.long_description ELSE products_description.long_description END AS long_description) against ('bu*' IN boolean mode) OR match (product_settings.setting_value) against ('bu*' IN boolean mode) OR match (products_additional_option_description.title) against ('bu*' IN boolean mode) OR match (products_sizes.size_title) against ('bu*' IN boolean mode) OR match (product_category_description.category_name) against ('bu*' IN boolean mode)) AND store_products.store_id = '3' GROUP BY products.products_id ORDER BY (rel_products_description_products_title*7) +(rel_product_settings_setting_value*6) +(rel_products_description_product_description*5) +(rel_products_description_long_description*4) +(rel_products_additional_option_description_title*3) +(rel_products_sizes_size_title*2) +(rel_product_category_description_category_name*1) DESC </code></pre> <p>ERROR : #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 '(CASE WHEN store_products_description.products_tit' at line 65</p>