В вашем случае похоже, что вы используете .NET. Использование параметров так же просто, как:
C #
string sql = "SELECT empSalary from employee where salary = @salary";
SqlConnection connection = new SqlConnection(/* connection info */);
SqlCommand command = new SqlCommand(sql, connection);
command.Parameters.AddWithValue("salary", txtSalary.Text);