Summation of column value in flat file

Hello Guys

Please find my below requirement

I have a flat file with column headers in first line and data

The structure like below

 
col1  col2  col3
 A       1      2
 B       3      4
 C       5      6

Say I have to take the summation of col2 (that will depend on the user)

The o/p will be summation of col2 is 9
Actually I also have to save the column header so I can connect to DB2 later and extract the column value summation from DB2 table

Thanks for time and effort for helping me

awk 'NR>1 {sum+=$2} END {print sum}' file

Thanks Anchal .

Can you please also help me to sort out the below issue

In case the user needs to have the summation for 2nd and 3rd column (will depend on the user input) how can the same can be achieved

Like

I/P

Enter the column you want to take the sumamtion for
2 3
The sum of col2 is 9
The sum of col3 is 12

I need to take the header value store as well