1. He said to me, "You will fail in the exam." -direct narration-

2. He told me that I should fail in the exam. -indirect narration-

3. He told me that I would fail in the exam. -indirect narration-
---------------------------------
#1 can be changed into #2 or #3. which one is correct? Do we have to use 'should' or 'would'?

All are grammatical, but they do not mean exactly the same thing. Look up "would", "should," and "will":

http://www.mirriam-webster.com

In direct narration, we use the exact words that someone said, whereas in indirect narration, we convert the speech into reported speech.

In regards to your question, both #2 and #3 are correct for converting #1 into indirect narration. You can use either "should" or "would" depending on the context and the intention behind the original statement.

If the intention of the speaker in the direct narration was to give advice or express a recommendation, then #2 with "should" is appropriate. For example, if the speaker wanted to suggest that failing the exam would be beneficial, then #2 would be the appropriate indirect narration.

If the intention in the direct narration was to make a prediction or state a fact, then #3 with "would" is appropriate. For example, if the speaker predicted or believed that the person would fail the exam, then #3 would be the correct conversion.

So, to summarize, both #2 and #3 are correct, and the choice between "should" and "would" depends on the intention and context of the original statement.