I don't know the specifics for Turkey, but let's start from the beginning...
First, in most countries, people are not swabbed for drugs at random (and even less systematically). Random swabs for explosives at security (on departure) are common, but not for drugs at customs (on arrival). Sniffer dogs in the baggage claim area are a possibility, but in my experience they are often trained for something completely different rather than drugs (though this probably depends a lot on the country, and possibly the specific airport or the origin of the flight).
So, in general, for you to be swabbed, you need to draw the attention of customs officers. This may be based on scans of your luggage before it is delivered to you, on a determination made by immigration officers during the passport/visa control interview, on your looks or demeanour, in rare cases on intelligence they received, but I would venture that in most places, this affects less than 1% of the arriving passengers.
If they decide to swab you or your belongings, and it comes back positive, now trouble starts. At the very least, you're set for some quality time with customs officers while they scan and search your belongings and yourself, and interview you to know more. How you are "handled" during this time varies from country to country and based on the officers' instincts and experience, taking into account your personal circumstances. But it will nearly certainly take a little while, and probably won't be the best time of your life.
If they don't find anything, then it's again up to them to decide what to do with you. It may range from a "sorry for the inconvenience, welcome to the country, have a nice visit" to an immediate return home if they think that, even though you're not carrying any drugs (or they didn't find any), you're up to no good. Remember that in most countries, they don't have to justify much (if anything), they can just send you back if they want. If they do decide this, you'll spend some more time in isolation until they manage to get you back on a flight.
So the probability you will get in trouble is probably quite low, but if you do, it's going to be a big hassle. The risk you actually end up in jail for just a positive swab is (in my opinion) quite low, even in the most strict countries (though it probably depends where they detect it, and the levels detected).
One important thing: if you are not travelling alone, and anyone travelling with you could be carrying drugs, then the risk for you increases considerably (you'll become guilty by association, and in some countries they'll just lump all of you together). If you have yourself taken any drugs recently, even if you do not carry any, likewise. And remember that "recently" can go back quite a little while for some drugs, depending on what kind of tests they decide to perform.
And of course, make sure you do not become an unwitting mule. If they do find any drugs, they will not care whether you or someone else placed them in your bags. In that case, you will end up in jail, and possibly worse.