I added some comments to your code and added few lines. Perhaps it will help. If I correctly understand your intention you want to examine every row of the table and copy contents of the third column to the second column if it begins with "GW" string, correct?
foreach (DataRow row in lstDS[0].Tables[0].Rows)
{
string fieldFromDB = row[2].ToString();
if (fieldFromDB.StartsWith("GW"))
{
row[1]=row[2];
}
}
And to answer another part of your question. DataSet doesn’t switch columns with rows.
If your Excel sheet looks like blow you will end up with DataTable containing 3 columns and 2 rows.
Column#1 Column#2 Column #3
abc def gh
axx cc GWa