If you can make it to the door, then do so. Get out of there as quickly as possible, without running. Urgent flight may be mistaken for one attempting to get away with something. Just walk directly and quickly to the nearest exit and get off their property by the most direct route. Your goal is to make it to neutral territory where they cannot base any further action upon your being on their property. Do not worry about cashing in chips; you can take care of that later.
Do not agree to go anywhere with them, particularly to a "backroom". Do not even step over to a secluded or private area. Try to force them to conduct their Gestapo tactics in full view of their patrons. Even if this does not discourage further detention, it may at least provide witnesses to what follows.
Let them know in a calm manner, but in no uncertain terms, that you wish to leave and that any detention by force, or threat of force, will be met with both criminal and civil action. Try to stay calm and do not become the aggressor, as this will be used against you. If you are detained by physical force, attempt to call the police. If you are not allowed to personally call the police, demand that the casino call them immediately. And repeat this demand at very opportunity. Remind them that they are not the law and that they have a duty to call the police. If you are with a friend, perhaps they can make the call for you. (Of course this "exposes" your friend.) A police officer will at least be a witness to the interrogation, if any, and may even come to your aid. Many real cops have considerable contempt for the poorly-trained security guards who may not have been able to qualify for any legitimate police force.
If you have done nothing wrong, you are under no obligation to show I.D., not even to the police. But if your assessment of the situation tells you it will help get you out of there, you may wish to show it. This may not be the best situation to "stand on your rights". This is your call, but DO NOT produce false I.D., if at all possible. If you are forcefully searched, then of course you are not in control of the situation.
Under no circumstances should you resist physical force. Not only will you probably be overpowered, and possibly seriously injured, but this will be used as an excuse to use more force and to justify the use of force in the first place. Your goal should be to get out of there, as quickly and efficiently as possible, leaving as little trail as you can. Remember, managers and security personnel don't last forever; you may wish to come back some day.