Why would a coworker be stern or cold with you after you said you liked him?

To the point of saying hello and just getting a look, but no smile or anything,

How can you work with someone like this going forward?

Why would a coworker be stern or cold with you after you said you liked him?
Post Opinion