I encountered the following situation:

Let C be an abelian category and X, Y be objects of C verifying $ Hom_C(X, Z)\cong Hom_C(Y, Z) $ For any object Z of C.

Does it follow that $ X \cong Y$?

My belief is that in general this not true. The real question is what additional hypothesis have to be satisfied by C in order to obtain isomorphic objects?

For example, if C closed then probably these two objects are isomorphic.