Thailand opened the scoring in the 15th minute through midfielder Prakit Deeprom and then went further ahead when Cameroon defender Aurelien Chedjou scored an own-goal in the 31st minute to make the score 2-0 to the hosts.
The visitors' fight back started just before half-time when Benjamin Moukandjo pulled a goal back.
The scores were level in the 77th minute when forward Clinton N'Jie scored with a penalty kick to make it 2-2.
The winner came in the 88th minute when Ngweni Ndasi scored after an assist by Moukandjo.
This was Cameroon's second win in two games after beating Indonesia 1-0 in a friendly on March 25.