SELECT
lang.name,
IF(
cscart_ult_language_values.value IS NULL,
lang.value, cscart_ult_language_values.value
) as value
FROM
cscart_language_values lang
LEFT JOIN cscart_ult_language_values ON cscart_ult_language_values.name = lang.name
AND company_id = 1
AND cscart_ult_language_values.lang_code = lang.lang_code
WHERE
lang.lang_code = 'ru'
AND lang.name IN (
'cannot_buy', 'no_products_selected',
'error_no_items_selected', 'delete_confirmation',
'text_out_of_stock', 'text_required_group_product',
'save', 'close', 'notice', 'warning',
'error', 'empty', 'text_are_you_sure_to_proceed',
'text_invalid_url', 'error_validator_email',
'error_validator_phone', 'error_validator_phone_mask',
'error_validator_phone_mask_with_phone',
'error_validator_integer', 'error_validator_multiple',
'error_validator_password', 'error_validator_required',
'error_validator_zipcode', 'error_validator_message',
'text_page_loading', 'error_ajax',
'text_changes_not_saved', 'text_data_changed',
'placing_order', 'order_was_not_placed',
'file_browser', 'browse', 'more',
'text_no_products_found', 'cookie_is_disabled',
'insert_image', 'image_url', 'loading',
'text_editing', 'save', 'cancel',
'cannot_buy', 'no_products_selected',
'error_no_items_selected', 'delete_confirmation',
'text_out_of_stock', 'text_required_group_product',
'save', 'close', 'notice', 'warning',
'error', 'empty', 'text_are_you_sure_to_proceed',
'text_invalid_url', 'error_validator_email',
'error_validator_phone', 'error_validator_phone_mask',
'error_validator_phone_mask_with_phone',
'error_validator_integer', 'error_validator_multiple',
'error_validator_password', 'error_validator_required',
'error_validator_zipcode', 'error_validator_message',
'text_page_loading', 'error_ajax',
'text_changes_not_saved', 'text_data_changed',
'placing_order', 'order_was_not_placed',
'file_browser', 'browse', 'more',
'text_no_products_found', 'cookie_is_disabled',
'insert_image', 'image_url', 'loading',
'text_editing', 'save', 'cancel'
)