You will retrieve your data using SqlDataReader / SqlCommand Object then you will write your code as:
int price=0;
SqlCommand cmd=new SqlCommand("your query",'SqlConnection Object');
SqlDataReader dr = cmd.ExecuteReader();
if(dr.Read())
{
price=Convert.ToInt32(dr[0].ToString());
}
dr.Close();
And you're done!
You have the integer 'price' ready to use in your code. Enjoy!