Thank you for the help.
But my problem is not yet solved,
I have 4 columns and want to retrieve only those columns which contains values other than NULL.
For Ex: we write query "
select Name,Contact1,Contact2,Address from details where ID=1 "
this query will return those mentioned columns, But now i want that if the contact1 column is having NULL value, so it should not be displyed. and this should be applied for every column and the query should retrieve only those columns of a particular row which is having value other than NULL