You need to add a WHERE clause to your SQL:
string id = Convert.ToString(Session["UserID"]);
string query = "SELECT UserId, SUM(AnswerResult)Score FROM t_AnswerSheet WHERE UserId=@ID GROUP BY UserId";
string connection = "server=sv01;database=testdb;uid=sa;password=[REDACTED]";
using (SqlConnection con = new SqlConnection(connection))
{
con.Open();
using (SqlCommand cmd = new SqlCommand(query, con))
{
cmd.Parameters.AddWithValue("@ID", id);
...
A couple of other things to make your life better:
1) Don't hardcode connection strings - always use a configuration file or similar.
2) Never post database ID and password combinations online...
3) Don't use the SA user - create users which have "just enough" permissions to do the job - it reduces the risks to the rest of your database(s), since SA can do anything at all!
4) Don't use single character variable names - it makes your code harder to read, and that means less maintainable in future (and you will spend a lot of time looking at code you or someone else has written a while a go, and working out how it works - or doesn't)
5) Always Dispose database connections, commands, adapters, etc: they are scarce resources and not doing so can make your app crash unpredictably.