You can do this with
NVIDIA Profile Inspector.
For games which don't have a profile, I recommend creating a "disable g-sync" profile you can add the executable to, rather than creating a new profile for each game.
Make sure that you only change the "application state" setting, and that you set it to "disallow" not "force off". The V-Sync setting is optional.
I used to have a big list of applications in my disallow g-sync profile, but have found it largely unnecessary now that I have stopped using windowed-mode G-Sync and leave it set to full-screen only. I had to create this profile for the example above.