You would be having Yes and No count columns in database.. on click of button just hit the table with below mentioned Update Query.
If (@ButtonType == 'Y')
begin
select @Count = Max(YesCountColumn) from Table
update table
set YesCountColumn = @count + 1
end
else
select @Count = Max(NoCountColumn) from Table
update table
set NoCountColumn = @count + 1
begin
end
Please tell me your table structure.. So that I can better give you solution.. I have build query as per below table structure
Create Table table(YesCountColumn int, NoCountColumn int)