you should write the following code on dropdownlist selectedindexchanged event
dim str as string
str="select column from tablename where colname=@condition"
dim con as new SqlConnection("Data Source=.;Initial Catalog=master; uid=sa;pwd=12335")
dim cmd as new SqlCommand(str,con)
cmd.CommandType=CommandType.Text
cmd.Paramaters.AddWithValue("@condition",DropDownList1.SelectedValue)
dim adap as new SqlDataAdapter(cmd)
dim dt as new DataTable
adap.fill(dt)
TextBox1.text=dt.Rows(0)(0).ToString()