So what is the problem? Just use an if-statement e.g.
if (DropDownList1.SelectedIndex == 1)
GridView1.DataSourceID = "SqlDataSource2";
else
GridView1.DataSourceID = "SqlDataSource1";
GridView1.DataBind();
Or use the ternary operator thus
GridView1.DataSourceID = DropDownList1.SelectedIndex == 1 ? "SqlDataSource2" : "SqlDataSource1";
GridView1.DataBind();