Quoting from Siam Legal:
Category 1 – Heroin;Amphetamine; Methamphetamine; MDMA (Ecstasy); LSD
Category 2 – Cocaine; Codeine; Methadone; Morphine
Category 5 – Cannabis; psychoactive mushrooms; Kratom Plant
For Category 1 Substances:
Up to 10 years imprisonment or a fine of 20,000 – 200,000 Baht for possession. Note again that if the quantity of the substance or substances found exceeds prescribed levels in the act, then possession for the purpose of disposal will be inferred. It should also be noted that 'disposal' is defined in the act as meaning to 'sell, distribute, give away indiscriminately, exchange or give
Up to 3 years imprisonment or a fine of 10,000 – 60,000 Baht for consumption
For Category 2 Substances:
Up to 5 years or a fine not exceeding 100,000 Baht or both for possession. If the quantity is 100 grams of a pure substance or more, this will be regarded as possession for the purpose of disposal
Six months to three years or a fine of 10,000 – 60,000 Baht or both for consumption
"Up to 5 years" in this case means that they can not sentence a person to any prison time. Judges sometimes allow prisoners to go to a drug treatment facility instead of going to prison or pay a hefty fine.