You can't "solve it" - the value returned from the table row and column reference is not a number - and since it comes from a database (I assume) that means two things:
1) The data in your db is not correct.
2) You DB design is faulty.
If that columns should always contain a number, then make it a number field: INT is good. When you take "the easy way out" and define all columns as text, it makes INSERTs easy, but will at some point mean that the data itself will become corrupt - not a number. That may not be spotted for days, months, or even years - but when it is it will be an nasty job to fix!
Always hold numeric data in numeric fields: INT, FLOAT, DATE, and so on: VARCHAR and NVARCHAR columns are for text based data only!
Then all you have to do is cast the field to an integer to use it:
int LevelID = (int) (ds.Tables[0].Rows[0]["LevelID"])
Easier to read, easier to type, and your whole system becomes more reliable.
So look at your data, fix it, and change your DB design! Then your problem will go away and can't come back!