Depends on the terms I know a lot in the UK who did this got a massive taxfree redundancy payment - then went to work for a competitor or went freelance my old boss went back to fixing COBOL
What I have realized is that in such companies your importance to a company is only as much as the next project. When project agendas changes, next time might be your turn. So take it as a warning to find a better place soon as possible.