I just want to ask if I was planning to go to someone and in the same minute he show up what is the suitable thing to say? Is it I was going to you? Thank you..
You would simply say
I was just going to see you.
using "just" indicates in the same moment they arrived. If someone calls you that you were about to call, you would say
I was just about to call you.
but you need to mention what you were about to do.
You could also say
I was just about to go to you.
Let's say that you have asked a friend who is very good at math for help with a calculus problem. It is your intention to stop by her library carrel, since you don't want to inconvenience her by also asking her to come to you. But she shows up at your library carrel. Then you might say,
Thanks so much for dropping by. I was going to come to you. I didn't mean for you to have to come to me.
going and coming are usually deictic, expressing the speaker's point of view, but that point-of-view can be reversed in situations where politeness and deference come into play, for example.