Not sure if you mean you made a turn with the steering lock disengaged and the wheels did not straighten out after the turn, but, instead stayed in the full right or left turn position.
This can be helped with an alignment or I have heard of people using a bungee attached to the bottom of the steering wheel and then to the seat or something to help the wheel return to straight ahead.
If you mean the steering wheel lock engaged and wouldn't let the steering wheel return to the straight ahead position then you can go in and remove or grind off the lock pin. I ground off the internal lock pin on my '08 Wrangler to eliminate the need to have my key in the ignition and to eliminate the possibility of it engaging accidentally.