You can go into Recovery mode and perform a Factory Reset which will wipe settings and any 3rd party installed applications or you can use an alternative way if you know that you have activated USB Debugging.
If USB Debugging is enabled, try downloading Android SDK Tools plus Platform Tools from the SDK Maanager. Once the process is completed, start a Command Prompt and type adb shell followed by rm /data/system/gesture.key. Restart the phone and enter any pattern you want. The phone will unlock and then you can change the screenlock method.
The phone needs to be rooted before you can use this method.