1-What did you do for him to notice you?
2-What did you do in order for him to notice you?
3-What did you do so that he would notice you?
4-What did you do so that he noticed you?

In which case:
a-He noticed you but maybe it was not your intention to be noticed
b-He noticed you and it was your intention to be noticed
c-Your intention was to be noticed by him but we don't know if he noticed you or not.

Gratefully,
Navi.