conditional statements you can create using if-function.
(if var1 = 1 & var2 = 1) var3 = 1.
(if var1 = 0 & var2 = 0) var3 = 0.
(if var1 = 1 & var2 = 0) var3 = 2.
You can create a sum score using the sum function.
compute var3 = sum(var1,var2,var4).
If you don't have a variable yet that indicates whether an answer was right or not, first use if, then use compute.
if (var1 = 6) var1right = 1.
if (var2 = 5) var2right = 1.
if (var3 = 2) var3right = 1.
compute totalright = sum (var1right, var2right, var3right).
is that what you need? if not, please indicate what the conditions are, or what the problem exactly is.