I have a product table like this.

Code:
pid	bigint	no	8
pname	varchar	no	50
pdescription	varchar	no	255
pprice	float	no	8
pminprice	float	no	8
I have a qualification table like this.

Code:
Column_name	Type	Computed	Length
q_id	 bigint	no	8
q_header	 varchar	no	50
q_name	 varchar	no	255
q_desc	 varchar	no	255
and I have a product qualification table like this

Code:
Column_name	Type	Computed	Length
ID	int	no	4
pid	bigint	no	8
q_id	bigint	no	8
Now I have to use SELECT query with Products and with that selection I have to display q_header +'-'+ q_name as a column with this product selection. The default value of these columns should be ZERO and if pid matches with q_id in product qualification, then it should 1. How can I accompalish this? Can someone show me a query for this?