You are absolutely fine. No need for testing.
1, You probably weren't pricked by a hypodermic needle.
2. Even if you were, it probably wasn't infected with hepatitis.
3. Even if it was, You probably didn't get it.
In my opinion. You are more likely to die in the shower tomorrow morning than to have contracted any disease from playing basketball.
"My imagination is killing me"
Yes it is
"if you are prick by needle while playing theres a chance that you will feel it?"
Your guess is as good as mine
"Do you think i need to be tested in this case?"
If YOUR worried, get tested, it is the only way to know for sure
Have a great day