If an enemy city is new, still size 1 and not grown at all, then it will always be destroyed when you capture it. Once a city grows to size 2 or larger, you will have the option of keeping it or razing (destroying) it.
Now, if a city has grown to size 2 or 3, and during the course of the war you kill citizens or pillage their food so they starve, it might shrink to size 1. But since it has grown larger, it will not be destroyed when you conquer it (I'm pretty sure).