I'm sorry, but you have come upon one of the biggest problems of English -- the pronunciation is not always predictable from the spelling. There is really no way to produce an accurate phonetic transcription of a word without knowing or hearing the way it is pronounced. But a bit of encouragement -- it is unlikely that an examiner will set major traps in an exam.
The problem with English pronunciation is that the language is spoken by so many people, from so many different places, that the one word may be pronounced in many ways by different English speakers. Even BBC English is no longer standardized -- on the BBC you now hear Yorkshire accents and London accents and Scottish accents, and many others, each of which has different pronunciations of the same words. And this doesn't even bring in American, Indian, Australian pronunciations, and others.
BUT are you being asked to use IPA phonetically or phonemically? If phonemically, it's a lot easier --- you aren't being asked to transcribe exactly, for example, 'caught' as pronounced by an American, or by a Londoner (the American perhaps as [ka:t] and the Londoner as [kɔ:t]), but to capture [kɔ:t] as the respective phonemes -- or whatever your phonemic transcription -- regardless of the differing pronunciations .
Good luck with the test!