you have 2 problems here.
1) to set the login success redirect URL, edit the authenticate user server behavior that is added to the login page. in the authenticate user server behavior, you cn set the page that will be loaded on login sucess or failure.
2) to redirect to a page specified in the database, you will need to add some custom code to the login success page.
In the authenticate user server behavior on the logion page, set a page to redirect to on login success, then go to the third step of the authenticate user behavior, on this step, you can select database columns to store in a session variable, click the plus button and select the column that contains the url.
Now on the login success page, you will need to add custom code to redirect based on the session that is stored.
for example, if the column name is landingPage and it contains the page name that should be loaded, the code would look like this:
<?php if(isset($_SESSION['landingPage']) && $_SESSION['landingPage'] != "") header("Location: ".$_SESSION['landingPage']); ?>