Compensation received is in lieu of “Salary”. As per basis of charge of salary i.e. Section 15, the amount received by or on behalf or employer or former employer shall be chargeable under the head “Salaries.”
• As per Section 17(1)(iv) Salary includes profits in lieu of Salary.
• As per Section 17(3)(i) Profits in lieu of salary includes the amount of any compensation due to or received by an assessee from his employer or former employer at or in connection with the termination of his employment or the modifications of the terms and conditions relating thereto.
From the above discussion it is clear that, compensation received from former employer is taxable under the head “Salaries.”
The question that you may have in your mind must be that the compensation has been awarded by the court and hence has nothing to do with salary and therefore a capital receipt.
In this case, one needs to go into the details of the judgement. Most probably, the court must have calculated the salary that you would have received had you not been terminated from the employment.
Thus, it is only the quantum of the compensation that has been decided by the court but the same will come from employer himself. In case, the amount of compensation includes cost for the mental harassment that you must have faced in the last 12 years then, only to such extent it may be treated as “Capital Receipt” and hence can be excluded from the income. The cost of the case (legal expenses etc.) awarded to you if any, can be treated as “Income From Other Sources” against which you can claim the actual expenses incurred by you.
Assuming that the compensation received by you is taxable under the head “Salaries” you can still claim relief as per Rule 21A(4) if compensation is received after rendering continuous service for not less than 3 years and the unexpired portion of the term of employment is also not less than 3 years.
Termination of employment may be due to any reasons resignation or dismissal or compulsory retirement, superannuation or even voluntary retirement.
Refer State Bank of Travancore v. Central Board of Direct Taxes  151 Taxman 140(Ker.) – CIT v. M. Raman  120 Taxman 338 (Mad.).