Declare @id int
Select @id = IdCol1 from table1 where col2 = 'abc'
Now in variable '@Id' you have the valu. Now you can use it directly to other query like
select * from table2 where col1 = @Id
Or fetch it to int variable in c# and pass as parameter to other sp/query.