SELECT 'products_image' org, products_image image
  FROM products where products_image is not null and products_image <> '' and products_id = <@PRODUCTS_ID@>
union
SELECT 'products_subimage1' org, products_subimage1
 FROM products where products_subimage1 is not null and products_subimage1 <> '' and products_id = <@PRODUCTS_ID@>
union
SELECT 'products_subimage2' org,products_subimage2
 FROM products where products_subimage2 is not null and products_subimage2 <> '' and products_id = <@PRODUCTS_ID@>
union
SELECT 'products_subimage3' org,products_subimage3
 FROM products where products_subimage3 is not null and products_subimage3 <> '' and products_id = <@PRODUCTS_ID@>
union
SELECT 'products_subimage4' org,products_subimage4
 FROM products where products_subimage4 is not null and products_subimage4 <> '' and products_id = <@PRODUCTS_ID@>
union
SELECT 'products_subimage5' org,products_subimage5
 FROM products where products_subimage4 is not null and products_subimage5 <> '' and products_id = <@PRODUCTS_ID@>
union
SELECT 'products_subimage6' org,products_subimage6
 FROM products where products_subimage4 is not null and products_subimage6 <> '' and products_id = <@PRODUCTS_ID@>