Question on Checkbox Field

I have requirment on Checkbox Field

In Checkbox have the two values like A,B

if you select the A checkbox, B should be hidden and A should be checked
if you select the B checkbox, A should be hidden and B should be checked(Issue is B is checked when clicked away from the checkbox(on screen))
can anyone provide the solution Please?

Thanks

OriginalPostID-227452

OriginalPostID-227452

  Discussion posts and replies are publicly visible