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 = 'tr' 
  AND lang.name IN (
    'cp_related_searches', 'cp_ls_mb_mean', 
    'cp_brands', 'categories', 'cp_featured_products', 
    'products', 'cp_f_products', 'products', 
    'cp_f_products', 'cp_ls_no_products_text', 
    'cp_view_all', 'cp_load_more', 'cp_related_searches', 
    'cp_ls_mb_mean', 'cp_brands', 'categories', 
    'cp_featured_products', 'products', 
    'cp_f_products', 'products', 'cp_f_products', 
    'cp_ls_no_products_text', 'cp_view_all', 
    'cp_load_more'
  )

Query time 0.00097

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "24.01"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_ult_language_values",
          "access_type": "system",
          "possible_keys": [
            "PRIMARY"
          ],
          "rows_examined_per_scan": 0,
          "rows_produced_per_join": 1,
          "filtered": "0.00",
          "const_row_not_found": true,
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.20",
            "prefix_cost": "0.00",
            "data_read_per_join": "408"
          },
          "used_columns": [
            "lang_code",
            "name",
            "value",
            "company_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "lang",
          "access_type": "range",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "lang_code",
            "name"
          ],
          "key_length": "392",
          "rows_examined_per_scan": 10,
          "rows_produced_per_join": 10,
          "filtered": "100.00",
          "index_condition": "((`eshopuga_upgr_4122`.`lang`.`lang_code` = 'tr') and (`eshopuga_upgr_4122`.`lang`.`name` in ('cp_related_searches','cp_ls_mb_mean','cp_brands','categories','cp_featured_products','products','cp_f_products','products','cp_f_products','cp_ls_no_products_text','cp_view_all','cp_load_more','cp_related_searches','cp_ls_mb_mean','cp_brands','categories','cp_featured_products','products','cp_f_products','products','cp_f_products','cp_ls_no_products_text','cp_view_all','cp_load_more')))",
          "cost_info": {
            "read_cost": "22.01",
            "eval_cost": "2.00",
            "prefix_cost": "24.01",
            "data_read_per_join": "3K"
          },
          "used_columns": [
            "lang_code",
            "name",
            "value"
          ]
        }
      }
    ]
  }
}

Result

name value
categories Kategoriler
cp_brands Brands
cp_featured_products Featured products
cp_f_products items
cp_load_more Load more
cp_ls_mb_mean Maybe you mean
cp_ls_no_products_text Products not found, try another search.
cp_related_searches Related searches
cp_view_all View all
products Ürünler