if coulmn is varchar()
step 1:
declear a varibles
string s; on class
step 2:
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if(checkBox1.Checked==true)
{
this.s = checkBox1.Text;
}
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
if (checkBox2.Checked == true)
{
this.s = checkBox2.Text;
}
}
private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
if (checkBox3.Checked == true)
{
this.s = checkBox3.Text;
}
}
step 3:
your command text="select * from employee where year= ' " + this.s + " ' ";