u have do somthing like this query........
string qry=select a.advtcountryid ,ag.agencycountryid,c.clientcountryid ,s.statecountryid from agency a,agency ag,client c,state s
where a.advtcountryid='" + countryid + "' and ag.agencycountryid='" + countryid + "' and c.clientcountryid='" + countryid + "' and s.countryid + ='" + countryid + "'";