By look at your code, i can see many issues and some of them are as follows. Please correct those issues and see whether you are still getting error messages ? once corrected , please run the code as suggested by "GanesanSenthilvel".
Point 1
Try changing the line [there is no space between select & subjectname in your query ]
c.CommandText = "selectsubjectname from SUBJECT& Teachername from TEACHER";
to
c.CommandText = "select subjectname from SUBJECT, Teachername from TEACHER";
point 2
Change the following [You needs to use comma(,) to retrieve multiple columns not &]
c = "select subjectname from SUBJECT& Teachername from TEACHER where SECTION NAME = '"+ ddlSearchBy.SelectedIndex
to
cc = "select subjectname from SUBJECT,Teachername from TEACHER where SECTION NAME = '"+ ddlSearchBy.SelectedIndex
look at your rest of the code and there are places you have used "&" instead of comma for the SQL query column seperator.
point 3
Check the line
ds = obj.GetData(cc, "SUBJECT,TEACHER,YEAR,SECTION");
...not sure what it does
point 4
hope ds is you dataset and in that case, change the followings
GridView1.DataSource = ds.row["subjectname from SUBJECT &Teachername from TEACHER"];
to
GridView1.DataSource = ds.table[0].defaultview();