My cat is sick .. or nervous.. or something

My cat is sick .. or nervous.. or something

Hello. Please help me if you can. My cat has been having I think diarrhea, and he now is hiding in the basement and won't come out. He is in an awkward space in the ceiling of the basement and I can't coax him down. Previously he has been crouching and twitching, and then he runs around like crazy. He's all right in small enclosed spaces or when I am petting him, but otherwise he acts like he is terrified. He is a one year old neutered male. Please help. Thanks.