how to assign tag in dataset on button click

i have tag(status) in dataset which has three options available active,inactive,expired
on click of a button how to assign any one value to tag

i am new to coding here,i know how to add onclick function

also how to change tag value on click of button(inactive to active or active to expired etc)

any help is appreciated,thanks in advance