considering very abstract nature of the question, the only answer I could think of is as a genralized query as below
Consider Table A, B and C are having foreign key relationship, you can write a query
select a.firstcolumn,b.secondcolumn,b.thirdcolumn
from tableA, tableB, tableC
where
tableA.primaryKeyColumn = tableB.ForeignKeyColumn
and
tableB.PrimaryKeyColumn = tableC.ForeignKeyColumn
Replace appropriate column and table name in the query,
Hope that helps.
-Milind