Q:

Sqlite Database and Radio Buttons in Android Studio

UI for this
User interface
and database
Sqlite Database
In my Code I want to compare selected Radio button is equal to the account type in database. 
If they equal it must start activity as stated in the if statement. 
I hardcoded my account type and it works but now i want to grab the account type from database and compare it with the string of selected radio button
 //Button To submit selected Radio button for a specicific account
    public void onClickSubmitAccount(){
        radio_accounts = (RadioGroup) findViewById(R.id.radioAccounts);
        btnSubmitAccount = (Button) findViewById(R.id.btnSubmitAccount);

        btnSubmitAccount.setOnClickListener(new View. OnClickListener() {
            @Override
            public void onClick(View view) {

                int selected_account = radio_accounts.getCheckedRadioButtonId();
                radio_button_accounts = (RadioButton) findViewById(selected_account);
                Toast.makeText(UserHomePageActivity.this, radio_button_accounts.getText().toString(), Toast. LENGTH_SHORT).show();

                if ((radio_button_accounts.getText().toString()).equals("Savings Account")) {
                    Intent accountIntent = new Intent(UserHomePageActivity.this, SavingsTransactionsActivity.class);
                    startActivity(accountIntent);
                }

                else if ((radio_button_accounts.getText().toString()).equals("Credit     Account")) {
                    Intent accountIntent = new Intent(UserHomePageActivity.this, CreditTransactionActivity.class);
                    startActivity(accountIntent);
                }

                else if ((radio_button_accounts.getText().toString()).equals("Cheque  Account")) {
                    Intent accountIntent = new Intent(UserHomePageActivity.this, ChequeTransactionActivity.class);
                    startActivity(accountIntent);
                }

                else {
                    Toast.makeText(UserHomePageActivity.this, "Sorry, No accout has been selected", Toast. LENGTH_LONG).show();
                }

            }
        });
    }

//Retrieve Data from DataBase in Table Account
    public ArrayList getAllAccount()
    {
    ArrayList<AccountClass>   accountList = new ArrayList<AccountClass>();
    Cursor cursor = bankingAppDB.query(Constants.tblAccount, null,null,null,null,null,null);
    AccountClass account;

    if(cursor.moveToFirst()){

        while (cursor.moveToNext())
        {
            String acc_number = cursor.getString(cursor.getColumnIndex(Constants. ACCOUNT_NUMBER));
            String account_type = cursor.getString(cursor.getColumnIndex(Constants. ACCOUNT_TYPE));
            double balance = Double.parseDouble(cursor.getString(cursor.getColumnIndex(Constants. ACCOUNT_BALANCE)));

            Log.d(" Info"," Account Number: " +acc_number+" type: "+account_type);
            account = new AccountClass(acc_number);
            accountList.add(account);
        }
    }
    return accountList;
}

//Adding Account number, Account Type and Balance to Account Table
    public void addAccount(AccountClass account){
    ContentValues values = new ContentValues();
    values.put(Constants. ACCOUNT_NUMBER, account.getAccountNumber());
    values.put(Constants. ACCOUNT_BALANCE, account.getAccountBalance());
    values.put(Constants. ACCOUNT_TYPE, account.getAccountType());
    bankingAppDB.insert(Constants.tblAccount, null, values);
    bankingAppDB.close();

}

A:

First of all your AccountClass is only receiving the account number attribute, there for you are not storing the rest of the values in your object. 
Change your constructor to get all the 3 attributes
 account = new AccountClass(acc_number, account_type, balance);

Secondly, you should have a method that gets an Account by it's number
 public List<AccountClass> getAccountsByNumber(String number){
      ArrayList<AccountClass>   accountList = new ArrayList<AccountClass>();
      String query = "SELECT * FROM " + YOUR_TABLE + " WHERE " + ACCOUNT_NUMBER + " = " + number;
      Cursor cursor = bankingAppDB.query(query, null,null,null,null,null,null);

      if(cursor.moveToFirst()){

    while (cursor.moveToNext())
    {
        String acc_number = cursor.getString(cursor.getColumnIndex(Constants. ACCOUNT_NUMBER));
        String account_type = cursor.getString(cursor.getColumnIndex(Constants. ACCOUNT_TYPE));
        double balance = Double.parseDouble(cursor.getString(cursor.getColumnIndex(Constants. ACCOUNT_BALANCE)));

        Log.d(" Info"," Account Number: " +acc_number+" type: "+account_type);
        AcountClass account = new AccountClass(number,account_type,balance);
        accountList.add(account);
    }
}
      return accountList;
 }

After that, assuming you know your user id, on your onClick method call
List<AccountClass> accountList = bankingAppDB.getAccountsByNumber(NUMBER_OF_THE_ACCOUNT);

and then
for(AccountClass a : accountList){
if ((radio_button_accounts.getText().toString()).equals(a.getAccountType()) && a.getAccountType().trim().equals("Savings Account")) {
                Intent accountIntent = new Intent(UserHomePageActivity.this, SavingsTransactionsActivity.class);
                startActivity(accountIntent);
            }

            else if ((radio_button_accounts.getText().toString()).equals(a.getAccountType())&& a.getAccountType().trim().equals("Credit Account")) {
                Intent accountIntent = new Intent(UserHomePageActivity.this, CreditTransactionActivity.class);
                startActivity(accountIntent);
            }

            else if ((radio_button_accounts.getText().toString()).equals(a.getAccountType())&& a.getAccountType().trim().equals("Cheque Account")) {
                Intent accountIntent = new Intent(UserHomePageActivity.this, ChequeTransactionActivity.class);
                startActivity(accountIntent);
            }

            else {
                Toast.makeText(UserHomePageActivity.this, "Sorry, No accout has been selected", Toast. LENGTH_LONG).show();
            }
}

