The deduction is only eligible if from qualified plans. This appears to be a bug in Turbo Tax.
We took a deeper look into your question about whether the South Carolina tax return was correctly excluding certain retirement income from the South Carolina taxable income. Even though you are reporting income from a non-qualified plan as defined by the IRS, the South Carolina tax return is treating that income correctly by reporting it on SC 1040 line p-1.
The South Carolina instructions for line p-1 are using the word 'qualified' in a different manner than what a 'qualified plan' is by definition from the IRS. In this case, 'qualified' according to South Carolina is:
Qualified retirement income is income from plans defined in IRC 401, 403, 408, and 457, and all public employee retirement plans of the federal, state, and local governments, including individual retirement plans, Keogh plans, and military retirement.
This list specifically mentions section 457 and military retirement, which are both 'non-qualified' plans by IRS definition, but they are 'qualified' for the South Carolina exclusion.
For reference, here are the SC 1040 Instructions – see page 28.