As a check to see whether you are in the if statements you could put in print statements in the different if conditions to see whether the code actually enters the if statements.
Also, are you declaring @percent as decimal or int? If it is int (or tinyint etc) you will get 0.
Jeremy