After thinking about this off and on for the night and trying a number of different strategies, I realized at last that the difficulty lay in the structure of the the problem you presented.
With an extremely complex query with multiple subqueries it might be possible to return the specific result set you desire.
HOWEVER, that query would be SO tricky that with your current skill set I sincerely doubt that you could adapt or debug it.
What's going on here is that your desire is not consistent with your data design. You need either to change your desire or your design.
You have created three tables, supposedly for three different types of entities:
cat_product_line_info
cat_sub_product_line_info
cat_item_info
These tables have NO relationship. There is NO FOREIGN KEY IDENTIFIER to support the sort of output you want.
To make the design flaw clearer, I'll rename them:
Movie_title
Annoying_Habit
Sugary_Cereal
What's the 'glue' that ties these tables together??
Nothing.
You could create a glue by creating another table: in your case I'll call it 'product':
Product would be simply a list of all ids that might be found in cat_product_line_info or cat_sub_product_line_info or cat_item_info
Now your query is a fairly simple outer join,
SELECT * from FROM product LEFT JOIN cat_product_line_info ON cat_product_line_info.id=product.id LEFT JOIN car_sub_product_line_info.id ON cat_product_line_info.id=car_sub_product_line_info.id
LEFT JOIN cat_item_info ON car_sub_product_line_info2.id=cat_item_info.id
WHERE product.id = somenumber
See, with this query, you don't need any ORs.
Your design flaw is that you intuit a table relationship to product ids, but you have not explicity created that relationship.
That said, may I further suggest that in the future you design such tables differently:
It appears that you don't necessarily have distinct data entities of cat_product_line_info or cat_sub_product_line_info or cat_item_info.
Since (apparently) the same product identifier will appear in ony one of these tables, it suggests that cat_product_line_info, cat_sub_product_line_info and cat_item_info are ATTRIBUTES of a single entity, say a 'PRODUCT' entity.
So you might -- you SHOULD -- create a SINGLE table, "PRODUCT" and give one column the attribute 'info', and populate each product id with some identifier like 'cat_item', 'cat_product_line' or 'cat_sub_product_line'.
I hope this all makes sense.