This question asks for your answer, so there is no single right one. But a good answer must do three things: say clearly what you would do, give a reason, and be honest about what is hard about it.
Sample answer: If I were the merchant, I would open the cage and let the parrot fly. It would be hard, because the parrot was my friend and the house would feel very quiet without its songs. But the bird asked for only one thing in its whole life, and it asked politely. A parrot is made for the sky — it has wings, and wings are of no use inside a cage of gold. Keeping it would mean I love myself more than I love the bird. So I would carry the cage into the garden, open the little door, and say goodbye properly. I would also keep a bird feeder on my windowsill with fruits and seeds, so that my friend could come back to visit me whenever it wished.