First get your TextBox value in some variable (say sal).
Retrieve values (say minSal & maxSal) from your DataBase Table.
Then check whether entered salary is between the two retrieved values:
if(sal<=maxSal && sal>=minSal)
{
}
else
{
}
And you're done!