Need help. Interactive buttons with a twist

Unfortunately, there is no conditional logic in Figma. You can vote for adding this functionality here:

To be able to change something, you must include it in your component’s variant. But in this case, I think it doesn’t fit at all. The best way to do what you want is to create additional frames with different content.