I am a programmer and work for a small company (no more than 50 people) but we have international clients and offices. Recently, our performance has been in decline, and we took a major hit in revenues as a result of a client leaving us. This led to a massive downsizing (relatively speaking), which means our small company is now smaller.

Some key employees have left us, or are currently leaving us, or are thinking about leaving us (and we don't seem to be replacing anyone who leaves). Among those in the third group is me.

There are many factors which lead me to want to look for employment elsewhere, but that's not my question. Suffice it to say, I've contributed a great deal to my company and am regarded by my colleagues as an expert in our technology. But I'm not too confident staying in what seems, to me, to be a sinking ship.

Recently, I've been gently approached by a C-level executive and was told that I am *needed* by the company, and implored me not to seek opportunities elsewhere. I don't know how they caught wind of my plans (lucky guess?). They did say there was some positive news forthcoming, but didn't say what.

So now I am in a situation where I *know* the company values me highly, but with the complications above. If I leave, I don't think I will get a counteroffer to stay, considering our situation. And if I stay, then I imagine my value will be "diluted" if the company recovers, and I will be less valuable then - and if it doesn't recover, I'll suddenly be jobless.

I feel like my value to my company is much higher now due to my contributions and expertise, but also due to circumstance. I would like to translate that into a raise, but I don't think that is possible at the moment. I am sure that if I go elsewhere, I can get a small pay bump as well. But I am keeping in mind that I've been told that good things are coming, and I'm wondering if that has to do with the company, me, or if it's just something said to make me stay.

At the end of the day, it seems like my value is very high at the moment, maybe exceeding my probably below average salary (for a programmer). It feels like I could gain something valuable from this experience, like a negotiation skill I've not been good at using so far. I think that if a raise is not possible, I can at least negotiate a better deal if the company does well and I decide to stay. I could also wait until the good news is announced before I make a decision.

So my question is, what are my options? How do I leverage my situation so that I can protect myself, but also gain some value for myself?