Police say officers are investigating the motive behind the attack in Thailand's capital Bangkok.