Is it obligatory to participate in conference if accepted?
As long as you haven't signed over any copyrights the paper is still yours. Yes, you can withdraw it. The organizers will grumble a bit, but you can ignore that. And even if you have already signed rights away you can ask to have them returned, which might happen or not.
But don't make a habit of this. The reviewers spent some effort on your paper that is now wasted.
The only other consequence is that your paper gets delayed. That could be a problem or not, depending on how many others are working in closely related areas.