If you are giving evidence (either during the examination or the cross-examination) in a court in Ireland, and you do not wish to answer a particular question, you must indicate to the judge that you are not prepared to answer the question and why.
There are very few circumstances where a judge will allow you to refuse to answer a question if it is relevant to the case. The right to refuse is known as a privilege:
When you have voiced your objection to answering a particular question, the judge will then decide whether you or not you must answer the question. If the judge decides that you cannot rely on a "privilege", then you must answer the question. If you fail to do so, you will be in contempt of court and you may be imprisoned.